#include <bits/stdc++.h>

using namespace std;

int main()
{
    int m=0,b,now=0,t;
    for(int x=1;x<=12;x++){
        cin>>b;
        now+=300;
        if(b<=now){
            t=(now-b)/100*100;
            now-=(t+b);
            m+=t;
        }else{

            cout<<'-'<<x;
            return 0;
        }
    }
    cout<<(m*1.2)+now;
    return 0;
}
